package com.sitech.portal.system.dao.ibatis;

import java.util.HashMap;
import java.util.List;

import com.sitech.ibnms.core.BaseIbnmsDao;
import com.sitech.portal.system.dao.ISysRoleDeptDao;
import com.sitech.portal.system.domain.TblSYS_ROLE_DEPT;

public class SysRoleDeptDaoImpl extends BaseIbnmsDao implements ISysRoleDeptDao {

	@Override
	public void delRoleDept(String deptId) {
		HashMap map = new HashMap();
		map.put("DEPT_ID", deptId);
		this.delete("deleteRoleOfDept", map);
	}

	@Override
	public List<HashMap> findRoleDeptListByDept(String deptId) {
		HashMap map = new HashMap();
		map.put("DEPT_ID", deptId);
		return this.query("findDeptRoleList", map);
	}

	@Override
	public List<HashMap> findRoleDeptListByUser(String userId) {
		HashMap map = new HashMap();
		map.put("USER_ID", userId);
		return this.query("findDeptRoleList", map);
	}

	@Override
	public void insertRoleDept(TblSYS_ROLE_DEPT obj) {
		this.insert("insertTblSYS_ROLE_DEPT", obj);
	}

}
